/**
 * jims
 */
package com.jims.master.modules.doctor.entity;

import com.fasterxml.jackson.annotation.JsonBackReference;
import com.jims.master.common.persistence.TreeEntity;
import org.hibernate.validator.constraints.Length;

import java.util.Date;
import java.util.List;

/**
 * 诊断Entity
 * @author chenxy
 * @version 2017-03-06
 */
public class HisDiagnosis extends TreeEntity<HisDiagnosis> {
	
	private static final long serialVersionUID = 1L;
	private String clinicId;		// 就诊记录ID/住院记录
	private String parentIds;		// 父级ID集合
	//private HisDiagnosis parent;		// 父级ID
	private String type;		// 诊断类型   1.中医  2.西医
	private String icdName;		// icd10名称
	private String icdCode;		// icd10编码
	private String operation;   //手术
	private String effect;   //效果
	private String description;		// 描述
	private String basis;		// 依据
	private String inoroutFlag;		// 住院/门诊    0.门诊  1.住院
	private String visitId;     // 住院id
	private String diagnosisDoctor;		// 诊断医生
	private String orgId;		// 机构ID
	private Date createDate;     //icd10  ID集合
	private String pathologicDiagnosis; // 病理诊断
	private String  pathologyNo; // 病理号
	private String patientId;
	private List<HisDiagnosis> sonList=null;

	public List<HisDiagnosis> getSonList() {
		return sonList;
	}

	public void setSonList(List<HisDiagnosis> sonList) {
		this.sonList = sonList;
	}

	@Override
	public Date getCreateDate() {
		return createDate;
	}

	@Override
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getOperation() {
		return operation;
	}

	public void setOperation(String operation) {
		this.operation = operation;
	}

	public String getEffect() {
		return effect;
	}

	public void setEffect(String effect) {
		this.effect = effect;
	}

	public HisDiagnosis() {
		super();
	}

	public HisDiagnosis(String id){
		super(id);
	}

	public String getVisitId() {
		return visitId;
	}

	public void setVisitId(String visitId) {
		this.visitId = visitId;
	}

	@Length(min=1, max=64, message="就诊记录ID/住院记录长度必须介于 1 和 64 之间")
	public String getClinicId() {
		return clinicId;
	}

	public void setClinicId(String clinicId) {
		this.clinicId = clinicId;
	}
	
	@Length(min=0, max=2000, message="父级ID集合长度必须介于 0 和 2000 之间")
	public String getParentIds() {
		return parentIds;
	}

	public void setParentIds(String parentIds) {
		this.parentIds = parentIds;
	}
	
	@JsonBackReference
	public HisDiagnosis getParent() {
		return parent;
	}

	public void setParent(HisDiagnosis parent) {
		this.parent = parent;
	}
	
	@Length(min=1, max=1, message="诊断类型长度必须介于 1 和 1 之间")
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	@Length(min=0, max=200, message="icd10名称长度必须介于 0 和 200 之间")
	public String getIcdName() {
		return icdName;
	}

	public void setIcdName(String icdName) {
		this.icdName = icdName;
	}
	
	@Length(min=0, max=200, message="icd10编码长度必须介于 0 和 200 之间")
	public String getIcdCode() {
		return icdCode;
	}

	public void setIcdCode(String icdCode) {
		this.icdCode = icdCode;
	}
	
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
	
	public String getBasis() {
		return basis;
	}

	public void setBasis(String basis) {
		this.basis = basis;
	}
	
	@Length(min=1, max=1, message="住院/门诊长度必须介于 1 和 1 之间")
	public String getInoroutFlag() {
		return inoroutFlag;
	}

	public void setInoroutFlag(String inoroutFlag) {
		this.inoroutFlag = inoroutFlag;
	}

	
	@Length(min=0, max=64, message="诊断医生长度必须介于 0 和 64 之间")
	public String getDiagnosisDoctor() {
		return diagnosisDoctor;
	}

	public void setDiagnosisDoctor(String diagnosisDoctor) {
		this.diagnosisDoctor = diagnosisDoctor;
	}
	
	@Length(min=1, max=64, message="机构ID长度必须介于 1 和 64 之间")
	public String getOrgId() {
		return orgId;
	}

	public void setOrgId(String orgId) {
		this.orgId = orgId;
	}

	public String getPathologicDiagnosis() {
		return pathologicDiagnosis;
	}

	public void setPathologicDiagnosis(String pathologicDiagnosis) {
		this.pathologicDiagnosis = pathologicDiagnosis;
	}

	public String getPathologyNo() {
		return pathologyNo;
	}

	public void setPathologyNo(String pathologyNo) {
		this.pathologyNo = pathologyNo;
	}

	public String getPatientId() {
		return patientId;
	}

	public void setPatientId(String patientId) {
		this.patientId = patientId;
	}
}